6a70baa2a0ef444444f933584a8cf3a8c1a79074,ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalog200Test.java,UpgradeCatalog200Test,testExecuteDMLUpdates,#,295
Before Change
Method updateHiveDatabaseType = UpgradeCatalog200.class.getDeclaredMethod("updateHiveDatabaseType");
UpgradeCatalog200 upgradeCatalog = createMockBuilder(
UpgradeCatalog200.class).addMockedMethod(removeNagiosService).addMockedMethod(updateHiveDatabaseType).createMock();
upgradeCatalog.removeNagiosService();
expectLastCall().once();
After Change
public void testExecuteDMLUpdates() throws Exception {
Method removeNagiosService = UpgradeCatalog200.class.getDeclaredMethod("removeNagiosService");
Method updateHiveDatabaseType = UpgradeCatalog200.class.getDeclaredMethod("updateHiveDatabaseType");
Method addNewConfigurationsFromXml = AbstractUpgradeCatalog.class.getDeclaredMethod
("addNewConfigurationsFromXml");
UpgradeCatalog200 upgradeCatalog = createMockBuilder(
UpgradeCatalog200.class).addMockedMethod(removeNagiosService).addMockedMethod(updateHiveDatabaseType).addMockedMethod(addNewConfigurationsFromXml).createMock();
upgradeCatalog.removeNagiosService();
expectLastCall().once();
upgradeCatalog.addNewConfigurationsFromXml();
expectLastCall();
upgradeCatalog.updateHiveDatabaseType();
expectLastCall().once();